package com.zpark.user.service.config;

import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.aop.interceptor.PerformanceMonitorInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * <P>
 * Mybatis-Plus 配置
 * </p>
 */
@Configuration
public class MybatisPlusConfig {

	/**
	 * 分页插件，自动识别数据库类型
	 */
	@Bean
	public PaginationInnerInterceptor paginationInnerInterceptor(){
		return new PaginationInnerInterceptor();
	}

	/**
	 * 启用性能分析插件
	 */
	@Bean
	public PerformanceMonitorInterceptor performanceMonitorInterceptor(){
		return new PerformanceMonitorInterceptor();
	}
}